package com.okq.service.Impl;

import com.okq.dao.OrderProductDao;
import com.okq.entity.OrderProduct;
import com.okq.service.IOrderProductService;
import com.okq.util.page.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 描述 : 订单产品接口实现类
 * 作者 : zdl
 * 日期 : 2017/6/29 15:59
 */
@Transactional
@Service
public class OrderProductServiceImpl implements IOrderProductService {
    @Autowired
    private OrderProductDao orderProductDao;

    @Override
    public void saveOrderProduct(OrderProduct orderProduct) {
        orderProductDao.saveOrderProduct(orderProduct);
    }

    @Override
    public void deleteOrderProduct(OrderProduct orderProduct) {
        orderProductDao.deleteOrderProduct(orderProduct);
    }

    @Override
    public void updateOrderProduct(OrderProduct orderProduct) {
        orderProductDao.updateOrderProduct(orderProduct);
    }

    @Override
    public void saveOrUpdateOrderProduct(OrderProduct orderProduct) {
        orderProductDao.saveOrUpdateOrderProduct(orderProduct);
    }

    @Override
    public OrderProduct getOrderProductById(String id) {
        return orderProductDao.getOrderProductById(id);
    }

    @Override
    public List<OrderProduct> listAllOrderProduct() {
        return orderProductDao.listAllOrderProduct();
    }

    @Override
    public Page<OrderProduct> pageByOrderProduct(Page<OrderProduct> page, OrderProduct orderProduct) {
        return orderProductDao.pageByOrderProduct(page, orderProduct);
    }

    @Override
    public OrderProduct getOrderProductByCode(String productCode) {
        return orderProductDao.getOrderProductByCode(productCode);
    }

	@Override
	public List<OrderProduct> listOrderProductByoid(String orderId) {
		// TODO Auto-generated method stub
		return null;
	}
}
